﻿<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
					   xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
					   x:Class="CalciumTemplateApp.Views.MainView"
			 xmlns:local="clr-namespace:CalciumTemplateApp;assembly=CalciumTemplateApp"
			 xmlns:calcium="clr-namespace:Outcoder.UI.Xaml;assembly=Outcoder.Calcium">
	
	<!-- The conventional approach to defining an toolbar is like so: -->
	<!--<ContentPage.ToolbarItems>
			<ToolbarItem Name="Conventional" />
		</ContentPage.ToolbarItems>-->

	<Grid Padding="5, 25" HorizontalOptions="CenterAndExpand">
		<Grid.RowDefinitions>
			<RowDefinition Height="*" />
			<RowDefinition Height="0" />
		</Grid.RowDefinitions>
		
		<StackLayout HorizontalOptions="CenterAndExpand">
			<Image Source="{calcium:ImageResource /Views/MainView/Images/CalciumLogo.png}" 
				   HorizontalOptions="Center" VerticalOptions="Start" />

			<Label Text="{x:Static local:AppResources.AppTitle}" 
				   HorizontalOptions="Center" VerticalOptions="Start" />
		</StackLayout>

		<!-- You can define an AppBar entirely in XAML, like so: -->
		<!--			<calcium:AppBar>-->
		<!--				<calcium:AppBar.Buttons>-->
		<!--				<calcium:AppBarItem Text="Item1" IconUri="/Views/MainView/Images/AppBar/Share.png" />-->
		<!--					<calcium:AppBarItem Text="Item2" />-->
		<!--				</calcium:AppBar.Buttons>-->
		<!--				<calcium:AppBar.MenuItems>-->
		<!--					<calcium:AppBarItem Text="MenuItem1" />-->
		<!--				</calcium:AppBar.MenuItems>-->
		<!--			</calcium:AppBar>-->

		<!-- Or you can bind to a buttons and menu items 
				to command collections: -->
		<calcium:AppBar 
			ButtonCommands="{Binding AppBarButtonCommands}"
			MenuCommands="{Binding AppBarMenuCommands}" 
			Grid.Row="1" />

		<!--		<Button Text="Hub" Command="{Binding NavigateToHubCommand}" />-->
	</Grid>
	
</ContentPage>